GetFormKey
Returns the current form key.
Syntax
expression.GetFormKey();
expression
- A variable that represents a ApiComboBoxForm class.
Parameters
This method doesn't have any parameters.
Returns
string
Example
This example shows how to get the form key.
let doc = Api.GetDocument();
let comboBoxForm = Api.CreateComboBoxForm({"key": "Personal information", "tip": "Choose your country", "required": true, "placeholder": "Country", "editable": false, "autoFit": false, "items": ["Latvia", "USA", "UK"]});
let paragraph = doc.GetElement(0);
paragraph.AddElement(comboBoxForm);
let key = comboBoxForm.GetFormKey();
paragraph = Api.CreateParagraph();
paragraph.AddText("Form key: " + key);
doc.Push(paragraph);